package com.hn658.base.message.account.dao.db.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.hn658.base.message.account.dao.db.IAccountManagerDBDAO;
import com.hn658.base.message.account.entity.AccountUserInfoEO;
import com.hn658.framework.dataaccess.mybatis.AbstractMyBatisDAO;
import com.hn658.framework.shared.exception.BusinessException;


@Repository
public class AccountManagerDBDAOImpl extends AbstractMyBatisDAO<AccountUserInfoEO, Long> implements IAccountManagerDBDAO{
	
	@Override
	public List<AccountUserInfoEO> findUserList() {
		List<AccountUserInfoEO> selectList = this.getSqlSession().selectList(this.mapperNamespace+".select");
		return selectList;
	}

	@Override
	public AccountUserInfoEO findByid(Long id) {
		if(id==null){
			throw new BusinessException("id不能为空");
		}
		return selectUniqueByProp("id", id);
	}

	@Override
	public List<String> findAccountId(String appKey) {
		return this.getSqlSession().selectList(this.mapperNamespace+".selectId",appKey);
	}
	
}
